﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using CoreBDS;
using System.Text;

namespace BatDongSan.Modules
{
    public partial class Uct_BusinessDetail : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }
        public void LoadBusiness(int businessId)
        {
            try
            {
                Cvk_Business info = BusinessBll.GetInfo(businessId, Utility.strConnect);
                if (info != null)
                {
                    lblTitle.Text = info.Name;
                    ltrImg.Text = string.Format("<img src=\"/Images/Business/{0}\" width=\"120px\" height=\"82px\" />", info.Img);
                    StringBuilder query = new StringBuilder();
                    query.AppendLine("<span><b>Địa chỉ:</b> " + info.Address + "</span>");
                    query.AppendLine("<span><b>Điện thoại:</b> " + info.Phone + " | <b>Fax:</b> " + info.Fax + "</span>");
                    query.AppendLine("<span><b>Website:</b> " + info.Website + "</span>");
                    query.AppendLine("<span><b>Email:</b> " + info.Email + "</span>");
                    ltrInfo.Text = query.ToString();
                    lblInfo.Text = info.Info;
                }
            }
            catch { }
        }
    }
}